package com.hellobike.haxing.modules.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hellobike.haxing.modules.order.entity.OrderAftersaleImg;
import com.hellobike.haxing.modules.order.mapper.OrderAftersaleImgMapper;
import com.hellobike.haxing.modules.order.service.IOrderAftersaleImgService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @Description: 售后订单图片
 * @Author: haxing-boot
 * @Date:   2020-02-08
 * @Version: V1.0
 */
@Service
public class OrderAftersaleImgServiceImpl extends ServiceImpl<OrderAftersaleImgMapper, OrderAftersaleImg> implements IOrderAftersaleImgService {

    @Override
    public List<String> getLinkHrefList(Long afterId) {
        QueryWrapper<OrderAftersaleImg> queryWrapper = new QueryWrapper<>();
        queryWrapper.lambda().eq(OrderAftersaleImg::getOrderAfterId,afterId);
        return super.list(queryWrapper).stream().map(e->e.getLinkHref()).collect(Collectors.toList());
    }
}
